//
//  UIButton+Extension.swift
//  sinaWeibo
//
//  Created by hjun on 16/3/26.
//  Copyright © 2016年 hjun. All rights reserved.
//

import UIKit

extension UIButton{

    convenience init(title: String,image:String,color:UIColor = UIColor.darkGrayColor(),font:CGFloat = HJBottomVieFontSize,bkgImage:String) {
    
     self.init()
    
        self.setTitle(title, forState: UIControlState.Normal)
        self.setImage(UIImage(named: image), forState: UIControlState.Normal)
        self.setTitleColor(color, forState: UIControlState.Normal)
        self.titleLabel?.font = UIFont.systemFontOfSize(font)
        
        self.setBackgroundImage(UIImage(named: bkgImage), forState: UIControlState.Normal)
        self.setBackgroundImage(UIImage(named: "\(bkgImage)__highlighted"), forState: UIControlState.Highlighted)
    
    
    
    }
    
    
    
}